<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
        <script type="text/javascript" src="../js/?f=jq.js,ut.js"></script>
    </head>
    <body>
        <script>
            function load(){
                var url='http://www.baidu.com/s?ie=utf-8&tn=uuola&wd=js%20%E5%88%A4%E6%96%ADiframe%20%E6%98%AF%E5%90%A6%E5%87%BA%E7%8E%B0%E6%BB%9A%E5%8A%A8%E6%9D%A1';
                $('#baidu').attr('src',url);
            };
            function resize(){
                var ifr = $('#baidu');
                ifr.height($(window).height() - ifr.offset().top - 15);
            };
            jQuery(function(){
                $(window).resize(resize);
                resize();
            });
        </script>
        <input type="button" id="btn" onclick="load();" value="load"/>
        <iframe src="about:blank" width="100%" height="600" id="baidu" allowtransparency="true" frameborder="0" scrolling="auto"></iframe>
    </body>
</html>
